<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.ejoysoft.common.Constants,com.ejoysoft.util.ParamUtil,com.ejoysoft.wlanyz.business.Task,com.ejoysoft.common.*,com.ejoysoft.wlanyz.business.Ac,java.io.File,java.util.ArrayList,java.util.Vector,java.io.FileNotFoundException"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	try {
		Task obj = new Task(globa, false);

		String strUrl = "task_list.jsp";
		String strUrl1 = "task_add.jsp";
		if (action.equals(Constants.DELETE_STR)) {
			String[] aryStrId = ParamUtil.getStrArray(request, "strId");
			for (int i = 0; i < aryStrId.length; i++) {
				obj.delete("where strId ='" + aryStrId[i] + "'");
			}
			globa.dispatch(true, strUrl);
		} else if (action.equals(Constants.ADD_STR)) {
			String strDesc = ParamUtil.getString(request, "strDesc", "");
			String strTestContent = ParamUtil.getString(request, "strTestContent", "");
			String strName = ParamUtil.getString(request, "strName", "");
			String strCreator = ParamUtil.getString(request, "strCreator", "");
			obj.setStrDesc(strDesc);
			obj.setStrTestContent(strTestContent);
			obj.setStrName(strName);
			obj.setStrCreator(strCreator);
			globa.dispatch(obj.add(), strUrl1);
		}

		/*else{
			Task obj0 = null;
			ApacheUpload au = new ApacheUpload(request);
			action = au.getString(Constants.ACTION_TYPE);
			if(action.equals(Constants.LOOK_STRING)){
					obj.setStrId(au.getString("strId"));
		    		obj0 = obj.show1(" where strId='" + obj.getStrId() + "'");
		    		obj.setStrName(au.getString("strName"));
		       		obj.setStrSex(au.getString("strSex"));
		       		obj.setIntAge(Integer.parseInt(au.getString("strIntAge")));
			        String strId=au.getString("strId");            
		        	globa.dispatch(obj.update(strId),strUrl);
		    }*/

		globa.closeCon();
	}

	catch (Exception e) {
		e.printStackTrace();
	}
%>